package org.devf.fork.imsimulator.service;

import org.devf.fork.imsimulator.service.api.UserApiClient;
import org.devf.fork.imsimulator.service.vo.UserExtendModel;

import java.util.HashMap;
import java.util.Map;

/**
 * FriendService related
 *
 * @author wanghuafu
 * @since 0.1 2023/9/12
 */
public class FriendService {

    private final Map<Long,UserExtendModel> cache = new HashMap<>();

    public UserExtendModel getUserInfo(Long userId) {
        return cache.computeIfAbsent(userId,
                UserApiClient::getUserInfo);
    }
}
